import request from "@/utils/request";

// 查询商城首页轮播图列表
export function listBanner(query) {
  return request({
    url: "/mall/banner/list",
    method: "get",
    params: query,
  });
}

// 查询商城首页轮播图详细
export function getBanner(id) {
  return request({
    url: "/mall/banner/" + id,
    method: "get",
  });
}

// 新增商城首页轮播图
export function addBanner(data) {
  return request({
    url: "/mall/banner",
    method: "post",
    data: data,
  });
}

// 修改商城首页轮播图
export function updateBanner(data) {
  return request({
    url: "/mall/banner",
    method: "put",
    data: data,
  });
}

// 删除商城首页轮播图
export function delBanner(id) {
  return request({
    url: "/mall/banner/" + id,
    method: "delete",
  });
}
//获取轮播图所关联的商品
export function showBankBannerProduct(data) {
  return request({
    url: "/mall/banner/showBankBannerProduct",
    method: "post",
    data: data,
  });
}
//保存关联的商品
export function saveCarousel(data) {
  return request({
    url: "/mall/banner/saveCarousel",
    method: "post",
    data: data,
  });
}
//上架状态
export function changeUpdateIsShelf(data) {
  return request({
    url: "/mall/banner/updateIsShelf",
    method: "put",
    data,
  });
}
//修改排序
export function changeSort(data) {
  return request({
    url: "/mall/banner/changeSort",
    method: "put",
    data,
  });
}
//分类
export function showProductCategory(data) {
  return request({
    url: "/commodity/category/showProductCategory",
    method: "get",
    data,
  });
}
// 应用场景 列表
export function tagList() {
  return request({
    url: "/commodity/tag/tagList",
    method: "get",
  });
}
// 品牌 列表

export function brandList() {
  return request({
    url: "/commodity/brand/brandList",
    method: "get",
  });
}
// 品牌 列表

export function brandListNew() {
  return request({
    url: "/commodity/brand/getMallBrandList",
    method: "get",
  });
}

//商品列表
export function showMallAllProduct() {
  return request({
    url: "/commodity/product/showMallAllProduct",
    method: "get",
  });
}
